Skip to content

Conversation

@angryfoxx
Copy link

No description provided.

@flashcode
Copy link
Owner

flashcode commented Jan 21, 2026

Hello @angryfoxx,

Thanks for your PR!

Fuzzy strings are not really "errors" in the file, as they are not used at runtime (it's like if strings were not translated).

But I agree it's nice to know we have fuzzy strings in the translations.

By the way you have some other easy ways to find them, for example with msgfmt:

$ msgfmt --statistics --output-file=/dev/null de.po
3849 translated messages, 4 fuzzy translations.

Or with pocount:

$ pocount de.po
Processing file : de.po
Type               Strings      Words (source)    Words (translation)
Translated:    3849 ( 99%)      37112 ( 99%)           40811
Fuzzy:            4 (  0%)         18 (  0%)             n/a
Untranslated:     0 (  0%)          0 (  0%)             n/a
Total:         3853             37130                  40811

Unreviewed:    3849 ( 99%)      37112 ( 99%)           40811
Needs-Work:       4 (  0%)         18 (  0%)               0

It could be added in msgcheck as well, but this should be an optional check disabled by default (with a new command line option), as msgcheck is really focused on "errors" in translations, ie typos, punctuation, etc., not on translation progress (number of fuzzy or untranslated strings).

@angryfoxx
Copy link
Author

ok i will work on this, i think this tool would be great after this implemantation thx for your review @flashcode

Copilot AI review requested due to automatic review settings January 31, 2026 14:49
@angryfoxx
Copy link
Author

hi @flashcode could u rw again

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new error_on_fuzzy option that raises an error when fuzzy strings are detected in PO files, addressing issue #16. Unlike the existing fuzzy check which processes fuzzy strings for validation, this new option treats the presence of fuzzy strings as an error condition.

Changes:

  • Added --error-on-fuzzy / -F CLI flag to report fuzzy strings as errors
  • Implemented fuzzy detection logic that reports each fuzzy string found
  • Added comprehensive test coverage for both positive and negative cases
  • Updated .gitignore with standard Python development artifacts

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
tests/test_msgcheck.py Added two test functions validating the error_on_fuzzy option with and without fuzzy strings present
src/msgcheck/po.py Added error_on_fuzzy check option and implementation to detect and report fuzzy strings
src/msgcheck/msgcheck.py Added CLI argument for error-on-fuzzy flag and integrated it into option processing
.gitignore Added common Python development directories and cache files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants